﻿# CMakeList.txt: 顶层 CMake 项目文件，在此处执行全局配置
# 并包含子项目。
#
cmake_minimum_required (VERSION 3.8)

project ("RobotHandAPP")

add_compile_options("$<$<C_COMPILER_ID:MSVC>:/utf-8>")
add_compile_options("$<$<CXX_COMPILER_ID:MSVC>:/utf-8>")


set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O1")

set(CMAKE_PREFIX_PATH "c:/Qt/5.15.2/msvc2019_64") # Qt Kit Dir
set(CMAKE_AUTOUIC ON)	#Qt 相关操作
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)


set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)	# 生成动态库lib文件已经符号文件
set(CMAKE_SKIP_BUILD_RPATH TRUE)

#通用路径设置
set(QTDIR "C:/Qt/5.15.2/msvc2019_64/")
set(CVDIR "C:/Program Files/opencv/")
set(PCLDIR "C:/Program Files/PCL 1.11.0")
set(ouput ${CMAKE_SOURCE_DIR}/bin)
set(SRCLIB ${CMAKE_SOURCE_DIR}/lib)
set(root ${CMAKE_SOURCE_DIR})
set(CVDIR "C:/Program Files/opencv/")

#通用头文件包含路径
include_directories(${CMAKE_SOURCE_DIR}/include
	${QTDIR}/include/QtCore		#QT核心头文件
	${QTDIR}/include			#QT头文件目录
	${CVDIR}/build/include		#opencv 头文件目录
	)

find_package(Qt5Core REQUIRED) # Qt 组件（默认支持核心） 

set(LIBRARY_OUTPUT_PATH ${ouput})		#库文件输出路径
set(EXECUTABLE_OUTPUT_PATH ${ouput})	#执行文件输出路径


# 包含子项目。
#add_subdirectory (./test)
add_subdirectory (./liblog)
add_subdirectory (./SystemJournal)
add_subdirectory (./commontools)
add_subdirectory (./visualtools)
add_subdirectory (./HttpServer)
add_subdirectory (./tcpsocket)
add_subdirectory (./SystemConfiguration)
add_subdirectory (./camera)
add_subdirectory (./pathbuild)
add_subdirectory (./pipeline)
add_subdirectory (./Algorithm)
add_subdirectory (./visAlgorithm)
add_subdirectory (./robothandcommunication)
add_subdirectory (./Camera)
add_subdirectory (./component)
add_subdirectory (./SystemState)

add_subdirectory ("RobotSystemSimulator")
add_subdirectory (./SystemCfgSetting)


add_subdirectory (./test)
